﻿using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;

namespace EditUsers_Best
{
    internal class MainPresenter
    {
        MainForm view;
        ITaskService tasks;

        public MainPresenter(MainForm view, ITaskService tasks)
        {
            this.view = view;
            this.tasks = tasks;

            // Get the view to display the module choices
            view.ShowTasks(tasks);
        }

        public void Execute(string taskName)
        {
            tasks.Execute(taskName);
        }

        internal void CloseApp()
        {
            view.Close();   // Closing main form shuts down app
        }
    }
}
